import serviceIo from '@/apis/request';
import urls, {PostModule, PostUrl} from '@/apis/urls.ts';

const post = {};
console.log(urls)
// 遍历urls文件中所有的模板
urls.forEach((module) => {
    post[module.moduleName] = {};
    console.log(module)
    module.urls.forEach(url => {
        post[module.moduleName][url.name] = data => serviceIo({
            url: url.url,
            method: url.type,
            data
        })
    })
})

export default post;
